package hc.service;

import hc.db.DBConnector;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;

public class AService {

	protected static Connection connection;

	public AService() {
		connection = DBConnector.getDBConnection();
	}

	public void exeuteSQL(String sql) {

	}

	public boolean insert(String sql) {
		boolean re = false;
		Statement sment = null;
		try {
			sment = connection.createStatement();
			re = sment.execute(sql);
			sment.close();
		} catch (SQLException e) {
			e.printStackTrace();
		} finally {
			try {
				sment.close();
			} catch (SQLException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		return re;
	}

}
